<template>
  <div class="di">
    <el-menu
      default-active="activeIndex2"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
      background-color="rgba(50,27,42,0.2)"
      text-color="#fff"
      active-text-color="#ffd04b"
    >
      <el-menu-item index="1">处理中心</el-menu-item>
      <el-submenu index="2">
        <template slot="title">我的工作台</template>
        <el-menu-item index="2-1">选项1</el-menu-item>
        <el-menu-item index="2-2">选项2</el-menu-item>
        <el-menu-item index="2-3">选项3</el-menu-item>
        <el-submenu index="2-4">
          <template slot="title">选项4</template>
          <el-menu-item index="2-4-1">选项1</el-menu-item>
          <el-menu-item index="2-4-2">选项2</el-menu-item>
          <el-menu-item index="2-4-3">选项3</el-menu-item>
        </el-submenu>
      </el-submenu>
      <el-menu-item index="3">消息中心</el-menu-item>
      <p style="color: white; float: right; padding: 6px 10px 0px 0px">
        欢迎您,<br />尊贵的Mustang用户
      </p>
      <router-link to="/denglu"
        ><el-button :plain="true" @click="open4" class="zhuxiao">
          <i class="el-icon-user-solid"></i>注销登录</el-button
        ></router-link
      >
    </el-menu>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activeIndex: "1",
      activeIndex2: "1",
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    },
    open4() {
      this.$message({
        message: "您已成功退出主页面",
        type: "warning",
      });
    },
  },
  component: {},
};
</script>

<style land="less"  scoped>
.el-menu {
  width: 99vw;
}
.zhuxiao {
  color: white;
  float: right;
  display: inline-block;
  padding: 12px 20px;
  font-size: 14px;
  position: relative;
  top: 10px;
  right: 40px;
  background-color: rgba(50, 27, 42, 0.2);
}
</style>